#MODULE_NAME :=my_gpio
#RESMAN_CORE_OBJS := gpio_general.o
#RESMAN_GLUE_OBJS := globaldef.o
#$(MODULE_NAME)-objs :=$(RESMAN_CORE_OBJS) $(RESMAN_GLUE_OBJS)
#obj-m := my_spi.o
obj-m := gpio_general.o
PWD := $(shell pwd)
CC := /opt/arm-2009q1-203/bin/arm-none-linux-gnueabi-gcc
LD := /opt/arm-2009q1-203/bin/arm-none-linux-gnueabi-ld
INSTALL_DIR=$(FINAL_DEST)/gpio_general
KERNEL_DIR :=/home/wangwei/dm365/dvsdk_dm365/psp/linux-2.6.32.17
#KERNEL_DIR := /lib/modules/$(shell uname -r)/build
# Set KERNEL_DIR to your local kernel location

all:
	$(MAKE) -C $(KERNEL_DIR) M=$(PWD) modules

install:
	mkdir -p $(INSTALL_DIR)
	cp gpio_test.ko $(INSTALL_DIR)
clean:
	rm -rf *.o *.ko *.mod.c .*.cmd .tmp_versions
